package word417.jiekl;

public class Triangle extends GeometricObject{
    public double getBottom() {
        return Bottom;
    }

    public void setBottom(double bottom) {
        Bottom = bottom;
    }

    public double getHigh() {
        return high;
    }

    public void setHigh(double high) {
        this.high = high;
    }


    public Triangle(double bottom, double high) {
        this.Bottom = bottom;
        this.high = high;
    }


    private double Bottom;
    private double high;

    @Override
    public double getArea() {
        return (Bottom*high)/2;
    }

    @Override
    public double getPerimeter() {
        return Bottom*3;
    }
}
